<form id="pagerForm" method="post" action="{:U('Checkpro/index')}"><!--{:U($module_name.'/'.$action_name."?model=".$model)} -->
    <input type="hidden" name="pageNum" value="{$pageNum}" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="orderField" value="{$orderField}" />
    <input type="hidden" name="orderDirection" value="{$orderDirection}" />
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="" method="post" rel="pagerForm"><!--{:U($module_name.'/'.$action_name)}-->
        <div class="searchBar">
            <ul class="searchContent">
                <li style="width:210px;">
                <label style="width: 60px;">产品名称：</label>
                <input type="text" name="name" value="{$name}"/>
                </li>
                <li style="padding-top:0;"><div class="buttonActive"><div class="buttonContent"><button type="submit">搜索</button></div></div></li>
            </ul>
        </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
			<li><a class="edit" href="{:U('Checkpro/edit')}&id={pid_product}"  target="dialog" width="580" height="350"  warn="请选择一条信息"><span>修改</span></a></li>
            <li class="line">line</li>
            <li><a class="icon" href="javascript:$.printBox('w_list_print')"><span>打印</span></a></li>
			<li class="line">line</li>
			<li><a class="edit" href="{:U('Checkpro/add')}" target="navTab" width="600" height="550" ><span>添加特制手机</span></a></li><!--rel="Checkpro_add"-->
			<li class="line">line</li>
			<li ><a class="delete" href="{:U('Checkpro/delall')}" rel="ids[]" target="selectedTodo" title="确实要删除这些记录吗?"><span>批量删除</span></a></li>
        </ul>
    </div>
    <div id="w_list_print">
        <table class="list" width="100%" targetType="navTab" asc="asc" desc="desc" layoutH="94">
            <thead>
                <tr>
					<th width="22"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
                    <th>名称</th>
                    <th>限购数量</th>
					<th>积分</th>
					<th>开始时间</th>
					<th>结束时间</th>
					<th>限制时间单位</th>
					<th>是否显示</th>
					<th>其他用户是否可买</th>
                </tr>
            </thead>
            <tbody>
                <volist name="lista" id="vo">
                <tr target="pid_product" rel="{$vo['id']}">
					<td><input name="ids[]" value="{$vo['id']}" type="checkbox"></td>
					<td>{$vo['name']}</td>
					<td>
						<php>if($vo['amount']<=0 ){
								echo '不限';
							}else{
								echo $vo['amount'];
							}
						</php>
					</td>
					<td>{$vo['point']}</td>
					<td>{$vo['starttime']|date="Y-m-d",###}</td>
					<td>{$vo['endtime']|date="Y-m-d",###}</td>
					<td>
						<php>switch($vo['period']){
								case 'd': echo '天';
									break;
								case 'w': echo '周';
									break;
								case 'm': echo '月';
									break;
								default:
								    echo $vo['period'];
							}
						</php>
					</td>
					<td>
						<php>switch($vo['status']){
								case 0: echo '不显示';
									break;
								case 1: echo '显示';
									break;
							}
						</php>
					</td>
                    <td>
						<php>switch($vo['buy']){
								case 0: echo '不可买';
									break;
								case 1: echo '可买';
									break;
							}
						</php>
					</td>
                </tr>
                </volist>
            </tbody>
        </table>
    </div>

    <div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
				<option value="50" {if $numPerPage==50}selected="selected"{/if}>50</option>
				<option value="100" {if $numPerPage==100}selected="selected"{/if}>100</option>
				<option value="200" {if $numPerPage==200}selected="selected"{/if}>200</option>
			</select>
			<span>条，共{$totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$pageNum}" ></div>
	</div>

</div>